package com.soupl.base.dao.impl;


import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import com.soupl.base.dao.UserDao;
import com.soupl.base.model.TUserinfo;

@Repository("userDao")
public class UserDaoImpl extends HibernateDaoSupport implements UserDao {
	public TUserinfo findUserByID(String id) {
		return ((TUserinfo) getHibernateTemplate().find("from TUserinfo").get(0));
	}

	@Autowired(required = true)
	public void setSessionFactory2(
			@Qualifier("sessionFactory") SessionFactory sf) {
		super.setSessionFactory(sf);
	}
}